/*
 *  Copyright 2003 by Spectrum Digital Incorporated.
 *  All rights reserved. Property of Spectrum Digital Incorporated.
 */

/*
 *  ======== led.c ========
 *
 *  This example blinks LED #0 at a rate of about 2.5 times per second using
 *  the LED module of the the EVMDM642 Board Support Library.
 *
 *  The purpose of this example is to demonstrate basic BSL usage as well
 *  as provide a project base for your own code.
 *
 *  Please see the BSL Examples for more detailed information.
 */

/*
 *  DSP/BIOS is configured using the DSP/BIOS configuration tool.  Settings
 *  for this example are stored in a configuration file called led.cdb.  At
 *  compile time, Code Composer will auto-generate DSP/BIOS related files
 *  based on these settings.  A header file called ledcfg.h contains the
 *  results of the autogeneration and must be included for proper operation.
 *  The name of the file is taken from led.cdb and adding cfg.h.
 */
#include "ledcfg.h"

/*
 *  The DM642 EVM Board Support Library is divided into several modules, each
 *  of which has its own include file.  The file evmdm642.h must be included
 *  in every program that uses the BSL.  This example also includes
 *  evmdm642_led.h because it uses the LED module.
 */
#include "evmdm642.h"
#include "evmdm642_led.h"


/*
 *  main() - Main code routine, initializes BSL and runs LED application
 */

void main()
{
    /* Initialize the board support library, must be first BSL call */
    EVMDM642_init();

    /* Initialize the LED modules of the BSL */
    EVMDM642_LED_init();

    while(1)
    {
        /* Toggle LED #0 */
        EVMDM642_LED_toggle(0);

        /* Spin in a software delay loop for about 200ms */
        EVMDM642_waitusec(200000);
    }
}
